package com.apply.repository;

import com.apply.entity.ExamInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author tianp
 */
public interface ExamRepository extends JpaRepository<ExamInfo, Long> {
    /**
     * 根据考试名称模糊查询
     *
     * @param examName
     * @return
     */
    public List<ExamInfo> findExamInfosByExamNameLikeOrderByCreateTimeDesc(String examName);

    /**
     * 根据考试名称模糊分页查询
     *
     * @param examName
     * @return
     */
    public Page<ExamInfo> findByExamNameLikeOrderByCreateTimeDesc(String examName, Pageable pageable);

}
